package com.ctshk.app.user.controller;

import com.ctshk.common.annotations.OperationLogAnnotation;
import com.ctshk.common.dto.Result;
import com.ctshk.common.enums.OperationLogModel;
import com.ctshk.common.enums.OperationLogType;
import com.ctshk.common.web.support.BaseController;
import com.ctshk.rpc.user.dto.MobileQueryDTO;
import com.ctshk.rpc.user.req.MobileQueryReq;
import com.ctshk.rpc.user.service.IOrderEsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * <p>
 *
 * </p>
 *
 * @author 李新科
 * @date 2021/5/24 17:33
 */
@Api(value="手机查单", tags="手机查单")
@RestController
public class MobileQueryController extends BaseController {

    @DubboReference
    private IOrderEsService orderEsService;

    @ApiOperation(value="手机查单", notes="手机查单")
    @OperationLogAnnotation(operModul = OperationLogModel.USER, operType = OperationLogType.QUERY, operTitle = "帮助详情", operDesc = "帮助详情")
    @PostMapping("/mobileQuery")
    public Result<MobileQueryDTO> mobileQuery(@RequestBody @Valid MobileQueryReq req) throws Exception{
        return orderEsService.queryByReq(req);
    }
}
